#ifndef EXECUTIONENGINE_H
#define EXECUTIONENGINE_H

#include "crossbit/common.h"
#include "crossbit/MemoryImage.h"
#include "crossbit/MemoryManager.h"
#include "crossbit/TraceManager.h"
#include "crossbit/Interpreter.h"
#include "crossbit/Translator.h"
#include "crossbit/TBlock.h"
#include "crossbit/TCache.h"
#include "crossbit/VBlockBuilder.h"
#include "crossbit/VFilter.h"
#include "crossbit/SyscallHandler.h"
#include "crossbit/VBlockAnalyzer.h"
#include "crossbit/ProcessorState.h"
#include "crossbit/CFG.h"
#include "polytope/Polytope.h"
//#include "crossbit/Smc.h"
using namespace polytope;
namespace crossbit {

	class ExecutionEngine {
		public:
			ExecutionEngine(MemoryImage 	*memory_image, 
					MemoryManager	*memory_manager,
					TraceManager	*trace_manager,
					Interpreter 	*interpreter, 
					VBlockBuilder 	*builder, 
					TCache 			*tcache,
					Translator 		*translator,
					SyscallHandler	*syscall_handler,
					ProcessorState	*processor_state,
					CFG				*cfg_builder,
					Polytope		*polytope_builder)
				:	ee_memory_image(memory_image),
				ee_memory_manager(memory_manager),
				ee_trace_manager(trace_manager),
				ee_interpreter(interpreter),
				ee_builder(builder),
				ee_tcache(tcache),
				ee_translator(translator),
				ee_syscall_handler(syscall_handler),
				ee_processor_state(processor_state),
				ee_cfg_builder(cfg_builder),
				ee_polytope_builder(polytope_builder)
		{
		}

			~ExecutionEngine()
			{
			}

			void run(int);


		protected:
			// major components of CrossBit
			MemoryImage	    * ee_memory_image;
			MemoryManager   * ee_memory_manager;
			TraceManager	* ee_trace_manager;
			Interpreter	    * ee_interpreter;
			Translator	    * ee_translator;
			VBlockBuilder	* ee_builder;
			TCache	    	* ee_tcache;
			SyscallHandler  * ee_syscall_handler;
			ProcessorState	* ee_processor_state;
			CFG				* ee_cfg_builder;
			Polytope		* ee_polytope_builder;

	};

}

#endif
